package com.xkdx.caipiao.hall;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;

import com.xkdx.caipiao.R;

public class LottoRuleActivity extends Activity {
	
	private ImageView back;
	WebView webView;
	String www;

   
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.lotto_rule_caipiao);
		findView();
	}

	void findView() {
	
		www = "file:///android_asset/dlt.html";
		webView = (WebView) findViewById(R.id.webView);
		webView.loadUrl(www);
		webView.setWebChromeClient(new WebChromeClient() {
			public void onProgressChanged(WebView view, int progress) {

			}
		});
		WebSettings setting = webView.getSettings();
		webView.setWebViewClient(new webViewClient());

		setting.setJavaScriptEnabled(true);
	}

	class webViewClient extends WebViewClient {

		// 重写shouldOverrideUrlLoading方法，使点击链接后不使用其他的浏览器打开。

		@Override
		public boolean shouldOverrideUrlLoading(WebView view, String url) {

			view.loadUrl(url);

			// 如果不需要其他对点击链接事件的处理返回true，否则返回false
			return true;

		}
	}
	public void onBackClick(View view) {
		finish();
	}
	

}
